<template>
  <div>
    <!-- 即将上映 -->
    <Card
      v-for="item in films"
      :key="item.filmId"
      model="comingSoon"
      :img="item.poster"
      :name="item.name"
      :type="item.filmType.name"
      :actors="item.actors|parseActors"
      :premiereAt="item.premiereAt|parseTime"
      :isPresale = "item.isPresale"
    />
  </div>
</template>

<script>
import url from '@/config/url'
import Card from '@/components/Card.vue'
export default {
  components: { Card },
  data() {
    return {
      films: []
    }
  },
  created() {
    this.$http.get(url.comingSoon).then((res) => {
      console.log(res)
      this.films = res.data.films
    })
  }
}
</script>

<style lang="scss" scoped>
</style>